import request from '@/utils/request'

// 查询商家分销列表
export function listTeam(query) {
  return request({
    url: '/system/distribution/list',
    method: 'get',
    params: query
  })
}

// 查询商家分销详细
export function getTeam(distributionId) {
  return request({
    url: '/system/distribution/' + distributionId,
    method: 'get'
  })
}

export function supplierIdById(supplierId) {
  return request({
    url: '/system/distribution/supplierIdById/' + supplierId,
    method: 'get',
  })
}


// 新增商家分销
export function addTeam(data) {
  return request({
    url: '/system/distribution/add',
    method: 'post',
    data: data
  })
}

// 修改商家分销
export function updateTeam(data) {
  return request({
    url: '/system/distribution',
    method: 'put',
    data: data
  })
}

// 删除商家分销
export function delTeam(distributionId) {
  return request({
    url: '/system/distribution/' + distributionId,
    method: 'delete'
  })
}

// 导出商家分销
export function exportTeam(query) {
  return request({
    url: '/system/distribution/export',
    method: 'get',
    params: query
  })
}
